/* 插件组管理样式 */

.modern-plugin-group-dialog {
    border-radius: 12px;
}

.modern-plugin-group-dialog .el-dialog__header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 20px 24px;
}

.modern-plugin-group-dialog .el-dialog__title {
    font-size: 18px;
    font-weight: 600;
}

.modern-plugin-group-dialog .el-dialog__body {
    padding: 0;
    max-height: 70vh;
    overflow: hidden;
}

.plugin-group-modal-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.search-section {
    padding: 20px 24px 16px;
    background: #fafbfc;
    border-bottom: 1px solid #e8ecf0;
}

.search-wrapper {
    margin-bottom: 12px;
}

.modern-search-input .el-input__inner {
    border-radius: 8px;
    border: 1px solid #d9d9d9;
    font-size: 14px;
    height: 40px;
    transition: all 0.3s ease;
}

.modern-search-input .el-input__inner:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.search-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-text {
    color: #666;
    font-size: 13px;
}

.tabs-section {
    flex: 1;
    overflow: hidden;
}

.modern-tabs .el-tabs__header {
    margin: 0;
    padding: 0 24px;
    background: white;
    border-bottom: 1px solid #e8ecf0;
}

.modern-tabs .el-tabs__nav-wrap::after {
    display: none;
}

.modern-tabs .el-tabs__item {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    padding: 0 20px;
    height: 50px;
    line-height: 50px;
}

.modern-tabs .el-tabs__item.is-active {
    color: #667eea;
}

.modern-tabs .el-tabs__active-bar {
    background-color: #667eea;
}

.tab-content {
    height: calc(70vh - 160px);
    overflow-y: auto;
    padding: 20px 24px;
}

/* 插件组网格布局 */
.plugin-group-grid-container {
    height: 100%;
}

.plugin-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
    padding-bottom: 20px;
}

/* 插件组卡片样式 */
.modern-plugin-group-card {
    background: white;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.modern-plugin-group-card:hover {
    border-color: #d9d9d9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.modern-plugin-group-card.is-bound {
    border-color: #52c41a;
    background: linear-gradient(135deg, #f6ffed 0%, #f0f9ff 100%);
}

.modern-plugin-group-card.is-bound::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #52c41a 0%, #73d13d 100%);
}

.card-header {
    padding: 16px 20px 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.plugin-group-icon-wrapper {
    position: relative;
    flex-shrink: 0;
}

.plugin-group-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.plugin-group-icon.icon-group-type-1 {
    background: linear-gradient(135deg, #1890ff, #40a9ff);
}

.plugin-group-icon.icon-group-type-2 {
    background: linear-gradient(135deg, #fa8c16, #ffa940);
}

.plugin-group-icon.icon-group-type-3 {
    background: linear-gradient(135deg, #722ed1, #9254de);
}

.plugin-group-status-indicator {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: #52c41a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    border: 2px solid white;
}

.card-title-section {
    flex: 1;
    min-width: 0;
}

.plugin-group-title {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.plugin-group-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.plugin-group-type-badge.type-1 {
    background: #e6f7ff;
    color: #1890ff;
}

.plugin-group-type-badge.type-2 {
    background: #fff7e6;
    color: #fa8c16;
}

.plugin-group-type-badge.type-3 {
    background: #f9f0ff;
    color: #722ed1;
}

.card-actions {
    flex-shrink: 0;
}

.action-btn {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 500;
}

.bind-btn {
    background: linear-gradient(135deg, #52c41a, #73d13d);
    border: none;
}

.unbind-btn {
    background: linear-gradient(135deg, #ff4d4f, #ff7875);
    border: none;
}

.card-content {
    padding: 0 20px 16px;
}

.plugin-group-desc {
    margin-bottom: 12px;
}

.plugin-group-desc p {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}

/* 插件组包含的插件列表 */
.plugins-in-group {
    margin-bottom: 12px;
    padding: 12px;
    background: #fafafa;
    border-radius: 8px;
}

.plugins-header {
    margin-bottom: 8px;
}

.plugins-title {
    font-size: 12px;
    font-weight: 600;
    color: #8c8c8c;
    text-transform: uppercase;
}

.plugins-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.plugin-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e8e8e8;
    font-size: 11px;
}

.plugin-mini-icon {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: white;
}

.plugin-mini-icon.mini-icon-type-1 {
    background: #1890ff;
}

.plugin-mini-icon.mini-icon-type-2 {
    background: #52c41a;
}

.plugin-mini-icon.mini-icon-type-3 {
    background: #fa8c16;
}

.plugin-mini-name {
    color: #595959;
    font-weight: 500;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.more-plugins {
    background: #f0f0f0 !important;
    border-color: #d9d9d9 !important;
    justify-content: center;
}

.more-text {
    color: #8c8c8c;
    font-weight: 600;
}

/* 优先级设置 */
.priority-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.priority-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.priority-input {
    width: 80px;
}

.priority-input .el-input__inner {
    padding: 0 8px;
    font-size: 12px;
    height: 28px;
    border-radius: 4px;
}

/* 已绑定插件组页面 */
.bound-plugin-groups-container {
    height: 100%;
}

.bound-plugin-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    padding-bottom: 20px;
}

.bound-plugin-group-card {
    background: white;
    border: 1px solid #e8ecf0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.bound-plugin-group-card:hover {
    border-color: #d9d9d9;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.bound-card-header {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
}

.bound-group-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bound-group-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

.bound-group-icon.icon-group-type-1 {
    background: linear-gradient(135deg, #1890ff, #40a9ff);
}

.bound-group-icon.icon-group-type-2 {
    background: linear-gradient(135deg, #fa8c16, #ffa940);
}

.bound-group-icon.icon-group-type-3 {
    background: linear-gradient(135deg, #722ed1, #9254de);
}

.bound-group-details {
    min-width: 0;
}

.bound-group-name {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    margin: 0 0 2px 0;
}

.bound-group-type {
    font-size: 12px;
    color: #8c8c8c;
}

.bound-card-actions {
    display: flex;
    gap: 8px;
}

.config-btn {
    color: #1890ff;
    font-size: 12px;
}

.remove-btn {
    color: #ff4d4f;
    font-size: 12px;
}

.bound-card-content {
    padding: 16px;
}

.bound-plugins-preview {
    margin-bottom: 12px;
}

.bound-plugins-title {
    font-size: 12px;
    color: #8c8c8c;
    margin-bottom: 8px;
}

.bound-plugins-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bound-plugin-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #666;
}

.bound-plugin-more {
    font-size: 11px;
    color: #8c8c8c;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 2px;
}

.bound-priority-display {
    text-align: right;
}

.bound-priority-display .priority-label {
    font-size: 11px;
    color: #8c8c8c;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 2px;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #8c8c8c;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-text {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 8px 0;
}

.empty-hint {
    font-size: 13px;
    margin: 0;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .plugin-group-grid {
        grid-template-columns: 1fr;
    }
    
    .bound-plugin-groups-grid {
        grid-template-columns: 1fr;
    }
}